/*
 *NOTE:Auto generated service implement
 */
package com.surfilter.modules.car.service.impl;

import java.util.List;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;

import org.springframework.stereotype.Service;

import com.surfilter.modules.car.dao.HtCarDao;
import com.surfilter.modules.car.model.HtCarModel;
import com.surfilter.modules.car.service.CarMgrService;
import com.surfilter.platform.base.model.ActionPermission;
import com.surfilter.platform.base.model.PageInfo;
import com.surfilter.platform.base.model.ParameterClassType;
import com.surfilter.platform.base.model.ParameterInfo;
import com.surfilter.platform.base.model.ParameterMapper;
import com.surfilter.platform.base.service.ServiceBase;

@Service(value = "carMgrService")
public class CarMgrServiceImpl extends ServiceBase implements CarMgrService {

	@Resource
	private HtCarDao htCarDao;

	@ActionPermission(actionName = "addHtCar", remark = "添加车辆")
	public java.lang.Integer addHtCar(HtCarModel htCarModel,
			HttpServletRequest request) {
		return htCarDao.addHtCar(htCarModel);
	}

	@ActionPermission(actionName = "chgHtCar", remark = "修改车辆")
	public void chgHtCar(HtCarModel htCarModel, HttpServletRequest request) {
		htCarDao.chgHtCar(htCarModel);
	}

	@ActionPermission(actionName = "delHtCar", remark = "删除车辆")
	public void delHtCar(HtCarModel htCarModel, HttpServletRequest request) {
		htCarDao.delHtCar(htCarModel);
	}

	@ActionPermission(actionName = "getHtCars", remark = "获取车辆列表")
	public List<HtCarModel> getHtCars(HtCarModel htCarModel,
			HttpServletRequest request) {
		return htCarDao.getHtCars(htCarModel, PageInfo.getPageInfo(request));
	}

	@ActionPermission(actionName = "delHtCars", remark = "批量删除车辆")
	@ParameterMapper({ @ParameterInfo(mapName = "ids", componentType = Integer.class, index = 0, mapType = ParameterClassType.ARRAY) })
	public boolean delHtCars(List<java.lang.Integer> ids) {
		htCarDao.delHtCars(ids);
		return true;
	}

	@ActionPermission(actionName = "getHtCarsCount", remark = "获取记录总数")
	public int getHtCarsCount(HtCarModel htCarModel) {

		return htCarDao.getHtCarsCount(htCarModel);
	}
}
